pkgname=sysbench
pkgver=1.0
pkgrel=19
pkgdesc="Benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load."
url="https://github.com/akopytov/sysbench.git"
arch=('x86_64' 'i386' 'aarch64')
license=('GPL')
source=("https://github.com/akopytov/sysbench/archive/$pkgver.$pkgrel.tar.gz")
md5sums=('2912bfe7238cac7351459019a84e2557')

build() {
	cd "$pkgname-$pkgver.$pkgrel"
	./autogen.sh
	./configure --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/ --disable-dependency-tracking
	make -j4
}

package() {
	cd "$pkgname-$pkgver.$pkgrel"
	make DESTDIR=$pkgdir install
	[[ $os == openeuler ]] && {
		mkdir -p $pkgdir/usr/lib64
		cp -rpf /usr/local/mysql/lib/* $pkgdir/usr/lib64/
	}
}
